package com.wxq.dbtest.mysql.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.*;

/**
 *
 * @TableName student
 */
@TableName(value ="student")
@ToString
@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
public class StudentMysql implements Serializable {
    public StudentMysql(String studentName, Date birthday1, Integer teacherId, Integer classId) {
        this.studentName = studentName;
        this.birthday1 = birthday1;
        this.teacherId = teacherId;
        this.classId = classId;
    }

    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer studentId;

    /**
     *
     */
    private String studentName;

    /**
     *
     */
    private Date birthday1;

    /**
     *
     */
    private Integer teacherId;

    /**
     *
     */
    private Integer classId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Date getBirthday1() {
        return birthday1;
    }

    public void setBirthday1(Date birthday1) {
        this.birthday1 = birthday1;
    }
//    @Override
//    public boolean equals(Object that) {
//        if (this == that) {
//            return true;
//        }
//        if (that == null) {
//            return false;
//        }
//        if (getClass() != that.getClass()) {
//            return false;
//        }
//        Student other = (Student) that;
//        return (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
//            && (this.getStudentName() == null ? other.getStudentName() == null : this.getStudentName().equals(other.getStudentName()))
//            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
//            && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
//            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()));
//    }
//
//    @Override
//    public int hashCode() {
//        final int prime = 31;
//        int result = 1;
//        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
//        result = prime * result + ((getStudentName() == null) ? 0 : getStudentName().hashCode());
//        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
//        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
//        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
//        return result;
//    }


}